﻿// Type: VSFile.Project.FSharpProjectFile
// Assembly: VSFile, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null
// Assembly location: C:\Downloads\VSFile.dll

namespace ReadSolutionContents
{
    /// <summary>
    /// Represents a Visual F# project file.
    /// 
    /// </summary>
    public class FSharpProjectFile : ProjectFile<FSharpSourceFile>
    {
        /// <summary>
        /// File extension of a Visual F# project file.
        /// 
        /// </summary>
        public const string ProjectFileExtension = ".fsproj";

        /// <summary>
        /// Constructor for specifying file path.
        /// 
        /// </summary>
        /// <param name="filePath">String representing path to Visual F# project file.
        ///             </param>
        public FSharpProjectFile(string filePath)
            : base(".fsproj", filePath, ".fs")
        {
        }

        /// <summary>
        /// Constructor for specifying project name.
        /// 
        /// </summary>
        /// <param name="projectName">String representing Visual F# project name.
        ///             </param><param name="filePath">String representing path to Visual F# project file.
        ///             </param>
        public FSharpProjectFile(string projectName, string filePath)
            : base(projectName, ".fsproj", filePath, ".fs")
        {
        }

        /// <summary>
        /// Create instance of source file with given file path.
        /// 
        /// </summary>
        /// <param name="filePath">String representing file path.
        ///             </param>
        /// <returns>
        /// Instance of source file with given file path.
        /// 
        /// </returns>
        protected override FSharpSourceFile CreateSourceFile(string filePath)
        {
            return new FSharpSourceFile(filePath);
        }
    }
}
